<include file="Common/header" />
<title>栏目管理</title>
<style>
.norag { border: none !important; font-weight: normal !important }
.select,.length_5{ width:200px;}
.length_6{ width:300px;}
.table_full tr th{ font-weight:normal; border-right: 1px solid #E6E6E6;} 
</style>
</head>
<body>
<nav class="breadcrumb">
  <div class="menu_4"> 
  <a href="{:U('index')}" >栏目列表</a> 
  <a href="{:U('edit')}"  class="active">添加栏目</a>  
    <a href="{:U('page_add')}" >添加单页</a> 
<a href="{:U('link_add')}" >添加外部链接栏目</a> 

   </div>
  <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a></nav>
<div class="pd-20">
 
  <div class="pop_nav">
    <ul class="J_tabs_nav" role="tablist">
      <li  class="current"  role="tab"><a href="javascript:;;">基本属性</a></li>
      <li role="tab"><a href="javascript:;;">选项设置</a></li>
    
 
    </ul>
     
  </div>
  <form class="J_ajaxForms" name="myform" id="myform" action="" method="post">
    <div class="J_tabs_contents J_check_wrap ">
      <div class="tabpanel" aria-hidden="false" style="display: block;">
        <div class="h_a">基本属性</div>
        <div class="table_full">
          <table class="table table-border table-bg table-hover" style="border-top:none">
            <tbody>
              <tr>
                <th width="200">请选择模型:</th>
                <td><select class="select-box" name="modelid" id="modelid">
                
                  
                  <volist name="models" id="vo">
   <option  value="{$vo.modelid}" <if condition="$cates['modelid'] eq $vo['modelid']"> selected </if> >{$vo.name}</option>
                  </volist>
                  </select> 
                  
                  </td>
              </tr>
              <tr>
                <th width="200">上级栏目:</th>
                <td><select class="select-box" name="parentid" id="parentid">
                    <option value="0">≡ 作为一级栏目 ≡</option>
       					{$Category}
    
                  </select></td>
              </tr>
               
      
              <tr id="normal_add">
                <th>栏目名称:</th>
                <td><input class="input-text radius length_5" type="text" name="catname" id="catname" class="input" value="{$cates.catname}"></td>
              </tr>
          
              <tr>
                <th>栏目缩略图:</th>
                <td>
                <input  class="input-text radius f-l length_6 filePicker_img" type="text" name="image" id="image" value="{$cates.image}" size="50" class="input">
                     <div class="btn btn-success radius"  onClick="swfupload(this,'.filePicker_img','');" style="margin-left:1.5em">选择图片</div>
                 
                 
                  <span class="gray"> </span></td>
              </tr>
            
              <tr>
                <th>栏目简介:</th>
                <td><textarea class="textarea" class="textarea" name="description" maxlength="255" style="width:300px;height:100px;">{$cates.description}</textarea></td>
              </tr>
         
          
              <tr>
                <th>栏目地址:
              
               
                </th>
                <td>
         <label> <input  name="urltype" type="radio" value="0" <if condition="$cates['cont'] eq 0"> checked </if> > 系统方法</label>&nbsp;  
       <label> <input  name="urltype" type="radio" value="1" <if condition="$cates['cont'] eq 1"> checked </if> > 普通</label> 
       <br>
                <input class="input-text radius length_6" type="text" name="action" id="seturl" class="input length_6" value="{$cates.action}">
                  <span class="gray"> {$cates.url}</span></td> 
              </tr>
              
                           <tr>   
                         <th>添加内容:</th>
                <td>
                
     <label> <input  name="cont" type="radio" value="0" <if condition="$cates['cont'] eq 0"> checked </if>> 是</label>&nbsp; 
       <label> <input  name="cont" type="radio" value="1" <if condition="$cates['cont'] eq 1"> checked </if>> 否</label>  
                    
                    </td>
                    
              </tr>
              
                  <tr>
                <th>状态:</th>
                <td>
                
     <label> <input  name="status" type="radio" value="0" <if condition="$cates['status'] eq 0"> checked </if>> 启用</label>&nbsp; 
       <label> <input  name="status" type="radio" value="1" <if condition="$cates['status'] eq 1"> checked </if>> 禁用</label> 
                    
                    </td>
                 </tr>    
       
            </tbody>
          </table>
        </div>
      </div>
      <div style="display: none;" class="tabpanel" aria-hidden="true">
        <div class="h_a">选项设置</div>
        <div class="table_full">
          <table class="table table-border table-bg table-hover" style="border-top:none">
            <tbody>
              <tr>
                <th width="200">是否在导航显示:</th>
                <td><ul class="switch_list cc ">
                    <li>
                      <label>
                        <input type="radio" name="ismenu" value="1"  <if condition="$cates['ismenu'] eq 1"> checked </if>>
                        <span>在导航显示</span></label>
                    </li>
                    <li>
                      <label>
                        <input type="radio" name="ismenu" value="0" <if condition="$cates['ismenu'] eq 0"> checked </if>>
                        <span>不在导航显示</span></label>
                    </li>
                  </ul></td>
              </tr>
              <tr>
                <th>显示排序:</th>
                <td><input class="input-text radius length_5" type="text" name="listorder" id="listorder" class="input" value="{$cates.listorder}"></td>
              </tr>
        
              <tr>
                <th><strong>META Title(栏目标题)</strong><br>
                  针对搜索引擎设置的标题</th>
                <td><input class="input-text radius length_5" name="setting[meta_title]" type="text" id="meta_title" class="input" value="{$cates.setting.meta_title}" size="60" maxlength="60"></td>
              </tr>
              <tr>
                <th><strong>META Keywords(栏目关键词)</strong><br> 
                  关键字中间用半角逗号隔开</th>
                <td><textarea class="textarea" name="setting[meta_keywords]" id="meta_keywords" style="width:90%;height:40px">{$cates.setting.meta_keywords}</textarea></td>
              </tr>
              <tr>
                <th><strong>META Description(栏目描述)</strong><br>
                  针对搜索引擎设置的网页描述</th>
                <td><textarea class="textarea" name="setting[meta_description]" id="meta_description" style="width:90%;height:60px">{$cates.setting.meta_description}</textarea></td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
       
 
  
       
       
    </div>
    <div class="btn_wrap">
      <div class="btn_wrap_pd" style="margin:20px">
        <button class="btn btn-primary radius " type="submit">提交</button>
      </div>
    </div>
  </form>
</div>
<include file="Common/foot" />
</div>
  

<script type="text/javascript">

 $(function(){
	 $(".J_tabs_nav li").click(function(){
		$(".J_tabs_nav li").removeClass('current');
		$(this).addClass('current');
		 $(".J_tabs_contents .tabpanel").hide();
		$(".J_tabs_contents .tabpanel:eq("+$(this).index()+")").show(); 
		 });
	 
	 
	 });

 
function swfupload(onthis,idclass,filetype,ty){
	  id_class=idclass;
	  upurl="/{:C('Swfupload.uploadDir')}/";
	  ty_=ty; 
	  
		if(!filetype){filetype='Images';}
			 hidoger.setconfig={ 
	 			type:filetype, 
				auto:true  ,
				 
	 		 };  	
			
			 layer.open({ 
			  type: 2,
			  title: '附件上传',
			  shadeClose: true,      
			  shade: 0.2,
			  area: ['70%', '550px'],
			  content: '{:U("Swfupload/index")}?type='+filetype, 
			  scrollbar: false 
			}); 
			
				
			  
	} 

 $(function(){
	 $("#parentid").children('option').each(function(){ 
		 if($(this).val()=='{$pid}'){
		 	 $(this).attr("selected",true);
			 return true;
			 
			 }
		 
		 });
	 
	 
	 });

</script> 
 
</body>
</html>